<template>
  <div>
    <a-icon v-if="cicon" :type="cicon" />
    <svg v-else-if="icon" class="icon">
      <use :xlink:href="`#${icon}`" class="use"></use>
    </svg>
    <a-icon v-else type="database"></a-icon>
    <span class="overflow_ellipsis">{{ label }}</span>
  </div>
</template>

<script>
export default {
  name: "eip-zerocode-field",
  data() {
    return {};
  },
  props: {
    icon: {
      type: String,
      default: "",
    },
    cicon: {
      type: String,
      default: "",
    },
    label: {
      type: String,
      default: "",
    },
  },
};
</script>
<style lang="less" scoped>
.icon,
i {
  width: 1em;
  height: 1em;
  margin: 0 6px;
}
.use {
  fill: rgba(0, 0, 0, 0.65);
}
</style>
